package ru.surfstudio.graduate.task;

import ru.surfstudio.graduate.data.Channel;
import ru.surfstudio.graduate.parser.FeedSearchParser;

public class FeedSearchTask extends GetHttpTask {
	
	private static final long serialVersionUID = 1L;

	public static final String URI = 
		"https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q={searchString}";
	
	/** Channel, для которого осуществляется поиск feeds */
	private Channel selectedChannel;
	
	public FeedSearchTask(Channel selectedChannel) {
		super(URI);
		params.put("searchString", selectedChannel.getUrl());
		parser = new FeedSearchParser();
		this.selectedChannel = selectedChannel;
	}

	public Channel getSelectedChannel() {
		return selectedChannel;
	}
	
}
